


import 'dart:io';

class CheckinBean {
  int pending;
  int received;
  int empty;
  List<DataDTO> list;

  CheckinBean(this.pending, this.received, this.empty, this.list);

  CheckinBean.fromJson(Map<dynamic, dynamic> json)
      : pending = json['pending'] as int,
        received = json['received'] as int,
        empty = json['empty'] as int,
        list = json['list'] == null ? null : (new List<dynamic>.from(json['list']).map((userJson) => DataDTO.fromJson(userJson)).toList());
}

class DataDTO {
  int id;
  String number;
  String uniqId;
  String operationMethod;
  String expected;
  String dropped;
  String dropDate;
  String emptyDate;

  DataDTO(this.id, this.number, this.uniqId, this.operationMethod, this.expected, this.dropped, this.dropDate, this.emptyDate);

  DataDTO.fromJson(Map<dynamic, dynamic> json)
      : id = json['id'] as int,
        number = json['number'] as String,
        uniqId = json['uniqId'] as String,
        operationMethod = json['operationMethod'] as String,
        expected = json['expected'] as String,
        dropped = json['dropped'] as String,
        dropDate = json['dropDate'] as String,
        emptyDate = json['emptyDate'] as String;
}

class CheckinInfo {
  int id;
  String containerNo;
  String uniqId;
  String type;
  String operationMethod;
  String checkinDock;
  String dropDate;
  List<String> bol;
  String door;
  String seal;
  String open;
  String licensePlate;
  List<String> shippingLabel;
  List<String> bag;
  List<String> product;
  List<String> damaged;
  List<String> specialRequest;
  bool isVerifiedQty;
  bool isSpecialRequest;
  bool isPallet;

  CheckinInfo(this.id, this.containerNo, this.uniqId, this.type, this.operationMethod, this.checkinDock, this.dropDate, this.bol, this.door, this.seal, this.open, this.licensePlate, this.shippingLabel, this.bag, this.product, this.damaged, this.specialRequest, this.isVerifiedQty,
      this.isSpecialRequest, this.isPallet);

  CheckinInfo.fromJson(Map<dynamic, dynamic> json)
      : id = json['id'] as int,
        containerNo = json['containerNo'] as String,
        uniqId = json['uniqId'] as String,
        type = json['type'] as String,
        operationMethod = json['operationMethod'] as String,
        checkinDock = json['checkinDock'] as String,
        dropDate = json['dropDate'] as String,
        bol = json['bol'] == null ? null : new List<String>.from(json['bol']) as List<String>,
        door = json['operationMethod'] as String,
        seal = json['seal'] as String,
        open = json['open'] as String,
        licensePlate = json['licensePlate'] as String,
        shippingLabel = json['shippingLabel'] == null ? null : new List<String>.from(json['shippingLabel']) as List<String>,
        bag = json['bag'] == null ? null : new List<String>.from(json['bag']) as List<String>,
        product = json['product'] == null ? null : new List<String>.from(json['product']) as List<String>,
        damaged = json['damaged'] == null ? null : new List<String>.from(json['damaged']) as List<String>,
        specialRequest = json['specialRequest'] == null ? null : new List<String>.from(json['specialRequest']) as List<String>,
        isVerifiedQty = json['isVerifiedQty'] as bool,
        isSpecialRequest = json['isSpecialRequest'] as bool,
        isPallet = json['isPallet'] as bool;
}


class PhotoBean {
  String urlImg;
  File image;

  @override
  String toString() {
    return 'PhotoBean{urlImg: $urlImg, image: $image}';
  }
}

class CheckinPendingQr {
  int id;
  String dock;
  String dropDate;
  List<String> bol = new List();
  String door;
  String seal;
  String open;
  String licensePlate;
  List<String> shippingLabel = new List();
  List<String> bag = new List();
  List<String> product = new List();
  List<String> damaged = new List();

  Map<String, dynamic> toJson() => {
    'id': id,
    'dock': dock,
    'dropDate': dropDate,
    'bol': bol,
    'door': door,
    'seal': seal,
    'open': open,
    'licensePlate': licensePlate,
    'shippingLabel': shippingLabel,
    'bag': bag,
    'product': product,
    'damaged': damaged,
  };
}

class CheckinPendingModel {
  int id;
  String containerNo;
  String uniqId;
  String type;
  String operationMethod;
  String specialRequest;
  bool isVerifiedQty;
  bool isSpecialRequest;
  bool isPallet;

  CheckinPendingModel(this.id, this.containerNo, this.uniqId, this.type, this.operationMethod, this.specialRequest, this.isVerifiedQty,
      this.isSpecialRequest, this.isPallet);

  CheckinPendingModel.fromJson(Map<dynamic, dynamic> json)
      : id = json['id'] as int,
        containerNo = json['containerNo'] as String,
        uniqId = json['uniqId'] as String,
        type = json['type'] as String,
        operationMethod = json['operationMethod'] as String,
        specialRequest = json['specialRequest'] as String,
        isVerifiedQty = json['isVerifiedQty'] as bool,
        isSpecialRequest = json['isSpecialRequest'] as bool,
        isPallet = json['isPallet'] as bool;
}


class CheckinVerifyQr {
  int id;
  List<String> bol = new List();
  int palletsQty;
  int productQty;
  int cartonsQty;
  List<String> specialRequestPhoto = new List();

  Map<String, dynamic> toJson() => {
    'id': id,
    'bol': bol,
    'palletsQty': palletsQty,
    'productQty': productQty,
    'cartonsQty': cartonsQty,
    'licensePlate': specialRequestPhoto,
  };
}